package com.shuogesha.platform.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.shuogesha.common.util.JsonResult;
import com.shuogesha.platform.entity.Authentication;

@FeignClient(value = "cloudFast-platform-authentication")
public interface AuthenticationFeignClient {
//	@RequestMapping(value = "/authentication/list")
//	public Object list(@RequestParam("name") String name, @RequestParam("pageNo") Integer pageNo,
//			@RequestParam("pageSize") Integer pageSize);
//
//	@RequestMapping(value = "/authentication/get")
//	public Object get(@RequestParam("id") Long id);
//
//	@RequestMapping(value = "/authentication/save", method = RequestMethod.POST)
//	public Object save(@RequestBody Authentication bean);
//
//	@RequestMapping(value = "/authentication/update", method = RequestMethod.POST)
//	public Object update(@RequestBody Authentication bean);
//
//	@RequestMapping(value = "/authentication/delete")
//	public Object delete(Long[] ids);
	
	//其他业务
	@RequestMapping(value = "/authentication/login")
	public JsonResult<Authentication> login(@RequestParam("username") String username,@RequestParam("password") String password,@RequestParam("ip") String ip);
	
	@RequestMapping(value = "/authentication/removeById")
	public JsonResult removeById(String id);
	
	@RequestMapping(value = "/authentication/findById")
	public Authentication findById(String id);
	
	@RequestMapping(value = "/authentication/retrieve") 
	public Authentication retrieve(String authId);
}
